package com.attendance.web;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 返回结果代码
 *
 * @author 鵺丶
 * @date 2020/12/09
 */
@ToString
@Getter
@AllArgsConstructor
public enum ResultCode {
    /** 请求成功 */
    SUCCESS(true,200,"操作成功!"),
    FAIL(false,502,"系统错误"),
    UNAUTHENTICATED(false,402,"用户未授权"),
    UNAUTHORISED(false,403,"用户权限不足"),
    SERVER_ERROR(false,503,"服务器繁忙"),
    PASSWORD_ERROR(false,201,"用户验证失败");

    /** 操作是否成功 */
    private final Boolean success;
    /** 请求返回代码 */
    private final Integer code;
    /** 提示信息 */
    private final String message;
}